<%@ page language="java" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
    <TITLE>信息管理-安全生产科技成果推广网</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <META http-equiv=x-ua-compatible content=ie=7>
    <META content="MSHTML 6.00.6000.17107" name=GENERATOR>
    <LINK href="<%=path%>/includes/Fvalidate/style.css" type=text/css rel=stylesheet>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/includes/KindEditor/kindeditor.js"></script>    
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/Fvalidate.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    
    <SCRIPT>
   	$(document).ready(function(){
	$("#frm").Fvalidate({live:true});
    //富文本编辑器
    KE.show({
		id : 'editorContent',
		resizeMode : 1,
		allowUpload : true,
		afterCreate : function(id) {},
		filterMode : true,
		
		items : ["source","|","fullscreen","undo","redo","print","cut","copy","paste","plainpaste",
"wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","|","selectall","-","title","fontname","fontsize","|","textcolor","bgcolor","bold","italic","underline","strikethrough","removeformat","|","image","flash","media","advtable","hr","emoticons","link","unlink","|","about"]
		});
	
	});
	
	function saveEditContent(){
		if(checkinput()){
			content = KE.util.getPureData("editorContent")
			htmlcontent = KE.html("editorContent");
			
			document.getElementById("SELL_INTRO").value=content;
			document.getElementById("SELL_INTROHTML").value=htmlcontent;
			
			document.frm.action="<%=path%>/market?method=addSelloneself";
			document.frm.submit();
		}
	}
	
	function checkinput(){
		if(!$("#frm").Fvalidate()){return false;}
		var ck = document.getElementsByName("SELL_COOPERATEWAY");
		var checkedcount = 0;
		for(i=0;i<ck.length;i++){
			if(ck[i].checked){
				checkedcount++;
				break;
			}
		}
		if(checkedcount<1){
			alert("[合作方式]不能为空");
			return false;
		}
		if(KE.util.getPureData("editorContent")==null || KE.util.getPureData("editorContent").length<20){
			alert("[简要说明]请输入20个汉字以上");
			return false;
		}
		return true;
	}
	function chooseOne(obj){
		var ck = document.getElementsByName(obj.name);
		for(i=0;i<ck.length;i++){
			if(ck[i].value != obj.value){
				ck[i].checked = false;
			}
		}
	}
    </SCRIPT>    
</HEAD>

<BODY>
<form  id="frm" name="frm"  method="post">
<table border="0" cellpadding="0" cellspacing="0" width="1000" align="center">
<tr>
	<td colspan="2" align="center"><%@include file="include/top.jsp"%></td>
</tr>
<tr>
    <td valign="top" width="200"><%@include file="include/marketleft.jsp"%></td>
    <td valign="top" width="800">
	<table border="0" cellpadding="0" cellspacing="0" width="800" align="center">
    	<tr>
        	<td width="160" height="30">自荐项目名称：</td>
            <td width="640"><input type="text"  id="SELL_TITLE" name="SELL_TITLE"  size="60" value=""  required="" label="自荐项目名称"></td>
        </tr>
        <tr>
        	<td width="160" height="30">所属行业领域：</td>
            <td width="640">
            <select name="SELL_NEWENERGYCLASS" id="SELL_NEWENERGYCLASS">
				<option value="">请选择</option>
			 	<option value='1 '>太阳能</option>
                <option value='2 '>风能</option>
                <option value='3 '>生物质能</option>
                <option value='4 '>地热能</option>
                <option value='6 '>其他</option>
            </select>
          </td>
        </tr>
        <tr>
        	<td width="160" height="30">关键词：</td>
            <td width="640"><input type="text" id="SELL_TOPICWORDS" name="SELL_TOPICWORDS" size="40" value="" class="input_text_grey" required label="关键词"></td>
        </tr>
        <tr>
        	<td width="160" height="30">合作方式：</td>
            <td width="640">
 	           	<input type="checkbox" name="SELL_COOPERATEWAY"  value="1" onclick="chooseOne(this)" required label="合作方式" >允许出口
                <input type="checkbox" name="SELL_COOPERATEWAY"  value="2" onclick="chooseOne(this)" required label="合作方式">限国内转让
                <input type="checkbox" name="SELL_COOPERATEWAY"  value="3" onclick="chooseOne(this)" required label="合作方式">不转让
                <input type="checkbox" name="SELL_COOPERATEWAY"  value="4" onclick="chooseOne(this)" required label="合作方式">面议
          </td>
        </tr>
        <tr>
        	<td width="160" height="30">联系单位：</td>
            <td width="640"><input type="text"  id="SELL_LINKUNIT" name="SELL_LINKUNIT"  size="60" value="" class="input_text_grey" required label="联系单位"></td>
        </tr>
        <tr>
        	<td width="160" height="30">联系人：</td>
            <td width="640"><input type="text"  id="SELL_LINKMAN" name="SELL_LINKMAN"  size="30" value=""  class="input_text_grey" required label="联系人"></td>
        </tr>
        <tr>
        	<td width="160" height="30">联系人电话：</td>
            <td width="640"><input type="text"  id="SELL_TEL" name="SELL_TEL"  size="30" value=""  class="input_text_grey" required label="联系电话"></td>
        </tr>
        <tr>
        	<td width="160" height="30">联系人手机：</td>
            <td width="640"><input type="text"  id="SELL_CELLPHONE" name="SELL_CELLPHONE"  size="30" value=""  class="input_text_grey" required label="联系人手机"></td>
        </tr>
        <tr>
        	<td width="160" height="30">联系人Email：</td>
            <td width="640"><input type="text"  id="SELL_EMAIL" name="SELL_EMAIL"  size="30" value=""  class="input_text_grey" required label="联系人Email" rule="email"></td>
        </tr>
        <tr>
        	<td width="160" height="30">通讯地址：</td>
            <td width="640"><input type="text"  id="SELL_ADDR" name="SELL_ADDR"  size="60" value="" class="input_text_grey" required label="通讯地址"></td>
      </tr>
        <tr>
        	<td width="160" height="30">邮编：</td>
            <td width="640"><input type="text"  id="SELL_ZIP" name="SELL_ZIP"  size="10" class="input_text_grey" required label="邮编"></td>
        </tr>
        <tr>
        	<td width="160" height="30">信息有效期：</td>
            <td width="640"><input type="text"  id="SELL_VALID" name="SELL_VALID"  onClick="WdatePicker()" size="10" class="input_text_grey" readonly required label="有效期限"></td>
        </tr>
        <tr>
        	<td width="160" height="30">简要说明：</td>
            <td width="640">
            <input type="hidden"  id="SELL_INTRO" name="SELL_INTRO" value="" class="input_text_grey">
            <input type="hidden"  id="SELL_INTROHTML" name="SELL_INTROHTML" value="" class="input_text_grey">
            
            <textarea class=""  id ="editorContent" name="editorContent" minlength="20" required error="正文内容不能为空或过于简洁！" label="简要说明" style="width:98%;height:195px;visibility:hidden;word-wrap:break-word;word-break:break-all;"></textarea>
          </td>
        </tr>
        <tr>
        	<td colspan="2" height="50" align="center">
            <input type="button" onClick="javascript:saveEditContent();" name="addtech" value="提交" /> 
            </td>
        </tr>
	</table>
    </td>
</tr>
</table>
</form>
</BODY>
</HTML>
